Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRUST QA-21: minimum voting delay #990

Merged
merged 3 commits into from
Oct 25, 2023
Merged

TRUST QA-21: minimum voting delay #990

merged 3 commits into from
Oct 25, 2023

Conversation

julianmrodri
Copy link
Contributor

  • Enforce Minimum voting delay of 1 day (dependes on Network Config)
  • Adds test

@julianmrodri julianmrodri requested a review from tbrent October 24, 2023 18:27
Copy link
Collaborator

@tbrent tbrent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look good

{}
{
MIN_VOTING_DELAY =
(86400 + NetworkConfigLib.blocktime() - 1) /
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's declare the 86400 figure as a constant just outside the contract

@@ -30,7 +31,9 @@ contract Governance is
// 100%
uint256 public constant ONE_HUNDRED_PERCENT = 1e8; // {micro %}

// solhint-disable no-empty-blocks
// solhint-disable-next-line var-name-mixedcase
uint256 public immutable MIN_VOTING_DELAY; // in blocks, based on network
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's reference here in the comment that it should be equal to ONE_DAY, or whatever we end up calling the 86400 figure as a constant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do the changes and push

Copy link
Collaborator

@tbrent tbrent Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also can use our unit notation {block} here

@tbrent tbrent merged commit a7f76a7 into 3.1.0 Oct 25, 2023
9 checks passed
@tbrent tbrent deleted the feat-minvotingdelay branch October 25, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants